<?php
$ipAdd = Yii::app()->user->getState('ipAddress');
?>
<!--
<div>
<?php //$this->render('cmswidgets.views.notification_frontend'); ?>
</div>
-->
<div class="add_content">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'form_register',
        'enableAjaxValidation' => false,
        'enableClientValidation' => true,
        'clientOptions' => array(
            'validateOnSubmit' => true,
        ),
    ));
    echo $form->hiddenField($model, 'ipAddress', array('value' => $ipAdd['ipAddress']));
    echo $form->hiddenField($model, 'countryCode', array('value' => $ipAdd['countryCode']))
    ?>  
    <fieldset>
        <legend>Account Information</legend>
        <div>
            <table>
                <tr>
                    <td width="120"><?= $form->labelEx($model, 'username') ?></td>
                    <td width="260"><?= $form->textField($model, 'username', array('class' => 'inputText250')) ?></td>
                    <td><?= $form->error($model, 'username', array()) ?></td>
                </tr>
                <tr>
                    <td><?= $form->labelEx($model, 'email') ?></td>
                    <td><?= $form->textField($model, 'email', array('class' => 'inputText250')) ?></td>
                    <td><?= $form->error($model, 'email', array()) ?></td>
                </tr>
                <tr>
                    <td><?= $form->labelEx($model, 'password') ?></td>
                    <td><?= $form->passwordField($model, 'password', array('class' => 'inputText250')) ?></td>
                    <td><?= $form->error($model, 'password', array()) ?></td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="2">Password bắt buộc phải có: 1 ký tự viết hoa <b>(A-Z)</b> + ít nhất 1 ký tự số <b>(0-9)</b> + ít nhất 1 ký tự đặc biệt <b>( - _ ! @ # $ % ^ & * ( ) + = ? . ,)</b></td>
                </tr>
                <tr>
                    <td><?= $form->labelEx($model, 'passwordConfirm') ?></td>
                    <td><?= $form->passwordField($model, 'passwordConfirm', array('class' => 'inputText250')) ?></td>
                    <td><?= $form->error($model, 'passwordConfirm', array()) ?></td>
                </tr>
            </table>
        </div>
    </fieldset>
    <fieldset>
        <legend>Address</legend>
        <div class="create_new_account">
            <table>
                <tr>
                    <td width="120"><?= $form->labelEx($model, 'displayName') ?></td>
                    <td><?= $form->textField($model, 'displayName', array('class' => 'inputText250')) ?></td>
                    <td><?= $form->error($model, 'displayName', array()) ?></td>
                </tr>
                <tr>
                    <td><?= $form->labelEx($model, 'phone') ?></td>
                    <td><?= $form->textField($model, 'phone', array('class' => 'inputText250')) ?></td>
                    <td><?= $form->error($model, 'phone', array()) ?></td>
                </tr>
                <tr>
                    <td><?= $form->labelEx($model, 'company') ?></td>
                    <td><?= $form->textField($model, 'company', array('class' => 'inputText250')) ?></td>
                    <td><?= $form->error($model, 'company', array()) ?></td>
                </tr>
                <tr>
                    <td><?= $form->labelEx($model, 'street') ?></td>
                    <td><?= $form->textField($model, 'street', array('class' => 'inputText250')) ?></td>
                    <td><?= $form->error($model, 'street', array()) ?></td>
                </tr>
                <tr>
                    <td><?= $form->labelEx($model, 'city') ?></td>
                    <td><?= $form->textField($model, 'city', array('class' => 'inputText250', 'value' => $ipAdd['cityName'])) ?></td>
                    <td><?= $form->error($model, 'city', array()) ?></td>
                </tr>
                <tr>
                    <td><?= $form->labelEx($model, 'region') ?></td>
                    <td><?= $form->textField($model, 'region', array('class' => 'inputText250', 'value' => $ipAdd['regionName'])) ?></td>
                    <td><?= $form->error($model, 'region', array()) ?></td>
                </tr>
                <tr>
                    <td><?= $form->labelEx($model, 'zipCode') ?></td>
                    <td><?= $form->textField($model, 'zipCode', array('class' => 'inputText250', 'value' => $ipAdd['zipCode'])) ?></td>
                    <td><?= $form->error($model, 'zipCode', array()) ?></td>
                </tr>

            </table>
        </div>
    </fieldset>
    <div style="margin-top: 20px; padding-bottom: 50px">
        <input class="bnt" type="submit" name="submit" value="Create New Account">
    </div>
    <?php $this->endWidget(); ?>  

</div>
<?php
?>

